<?php 
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header');
?> 
<script language="javascript" type="text/javascript" src="<?php echo JS_PATH?>commoncheck.js"></script>
<body onload="pwdcheck()">
<div class="txt_head_frame">
	<span class="txt_frame_title">修改密码</span>
</div>
<form name="myform" action="?m=admin&c=adminmanage&a=admin_edit_pwd" method="post" id="myform">
<div id="main_content">
<input type="hidden" name="info[userid]" value="<?php echo $userid;?>"></input>
<input type="hidden" name="info[username]" value="<?php echo $username;?>"></input>
<div class="txt_content_frame">
	<div class="txt_content_box">
		<div class="txt_content_left">
			<div class="txt_text_left">用户名:</div>
			<div class="txt_left_input"><?php echo $username;?></div><br/><br/>
			<div class="txt_text_left">旧密码:<span>[*]</span></div>
			<div class="txt_left_input"><input name="old_password" type="password" class="txt" id="old_password"/></div><span id="validateold_password" class="validate"></span><br/><br/>
            <div class="txt_text_left">新密码:<span>[*]</span></div>
			<div class="txt_left_input"><input name="new_password" type="password" class="txt" id="new_password"/></div><span id="validatenew_password" class="validate"></span><br/><br/>
            <div class="txt_text_left">确定密码:<span>[*]</span></div>
			<div class="txt_left_input"><input name="new_pwdconfirm" type="password" class="txt" id="new_pwdconfirm"/></div><span id="validatenew_pwdconfirm" class="validate"></span><br/><br/>
		</div>
	</div>
</div>

<div class="txt_btn">
	<input name="dosubmit" type="submit" class="txt_btn_a" value=" 保存 " />
</div>
</div>
</form>
</body>
<script type="text/javascript">
<!--
//密码修改检测
function pwdcheck(){
	$('#old_password').blur(function(){
		var validatecPWD = $('#validateold_password');
		if(isNotNull($(this).val())){
			if(is_password($(this).val())){				
				validatecPWD.html('<img src="images/true.gif" width=16 heigth=16>');		
			}else {				
				validatecPWD.html('<img src="images/false.gif" width=16 heigth=16>密码为6-20位');	
			}
		} else {
			validatecPWD.html('<img src="images/false.gif" width=16 heigth=16>密码不能为空');					
		}
	});
	$('#new_password').blur(function(){
		var validatecPWD = $('#validatenew_password');
		if(isNotNull($(this).val())){
			if(is_password($(this).val())){				
				validatecPWD.html('<img src="images/true.gif" width=16 heigth=16>');		
			}else {				
				validatecPWD.html('<img src="images/false.gif" width=16 heigth=16>密码为6-20位');	
			}
		} else {
			validatecPWD.html('<img src="images/false.gif" width=16 heigth=16>密码不能为空');					
		}
	});
	
	$('#new_pwdconfirm').blur(function(){
		var validatecPWD2 = $('#validatenew_pwdconfirm');
		if($(this).val() != $('#new_password').val()){
			validatecPWD2.html('<img src="images/false.gif" width=16 heigth=16>两次输入密码不同');	
		} else {
			validatecPWD2.html('<img src="images/true.gif" width=16 heigth=16>');		
		}
	});
}
//-->
</script>
</html>